package sctu.edu.java.year2016.team01.zhuming.day20160605.practice;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/6/7.
 */
public class Gather{
    public static void main(String[] args){
        List list=new ArrayList();
        int i=(int)(Math.random()*(list.size()-1));
        list.add("a");
        list.add("b");
        list.add("c");
        System.out.println("随机获取数组元素："+list.get(i));
        list.remove(2);
        System.out.println("将索引是"+2+"的元素从数组移除后，数组的元素是:");
        for(int j=0;j<list.size();j++)

            System.out.println(list.get(j));
    }
}
